package com.lry.consumer.consumer;

import com.lry.interfac.AjaxResult;
import org.apache.dubbo.rpc.cluster.Merger;


public class MyMerger implements Merger<AjaxResult> {

    @Override
    public AjaxResult merge(AjaxResult... ajaxResults) {
        for(AjaxResult ajaxResult : ajaxResults){
            if(!ajaxResult.isSuccess()){
                return ajaxResult;
            }
        }
        return AjaxResult.success();
    }
}
